import { PointIndex } from '@/geom/geo-index'
import type { Airport } from './types'

export let airportIndex: PointIndex<Airport>

export function initAirportIndex(wptLst: Airport[]) {
  airportIndex = new PointIndex({
    data: wptLst,
    getX: (e) => e.location.lng,
    getY: (e) => e.location.lat
  })
}
